Optimal. Leaf size=40 \[ a x+\frac {b (c+d x) \tanh ^{-1}(c+d x)}{d}+\frac {b \log \left (1-(c+d x)^2\right )}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {6238, 6021,
266} \begin {gather*} a x+\frac {b \log \left (1-(c+d x)^2\right )}{2 d}+\frac {b (c+d x) \tanh ^{-1}(c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 266
Rule 6021
Rule 6238
Rubi steps
\begin {align*} \int \left (a+b \tanh ^{-1}(c+d x)\right ) \, dx &=a x+b \int \tanh ^{-1}(c+d x) \, dx\\ &=a x+\frac {b \text {Subst}\left (\int \tanh ^{-1}(x) \, dx,x,c+d x\right )}{d}\\ &=a x+\frac {b (c+d x) \tanh ^{-1}(c+d x)}{d}-\frac {b \text {Subst}\left (\int \frac {x}{1-x^2} \, dx,x,c+d x\right )}{d}\\ &=a x+\frac {b (c+d x) \tanh ^{-1}(c+d x)}{d}+\frac {b \log \left (1-(c+d x)^2\right )}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 48, normalized size = 1.20 \begin {gather*} a x+b x \tanh ^{-1}(c+d x)+\frac {b (-((-1+c) \log (1-c-d x))+(1+c) \log (1+c+d x))}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.58, size = 44, normalized size = 1.10
method | result | size |
derivativedivides | \(\frac {\left (d x +c \right ) a +\left (d x +c \right ) b \arctanh \left (d x +c \right )+\frac {b \ln \left (1-\left (d x +c \right )^{2}\right )}{2}}{d}\) | \(41\) |
default | \(a x +b \arctanh \left (d x +c \right ) x +\frac {b \arctanh \left (d x +c \right ) c}{d}+\frac {b \ln \left (1-\left (d x +c \right )^{2}\right )}{2 d}\) | \(44\) |
risch | \(a x +\frac {b \ln \left (d x +c +1\right ) x}{2}-\frac {b x \ln \left (-d x -c +1\right )}{2}+\frac {b \ln \left (-d x -c -1\right ) c}{2 d}-\frac {b \ln \left (d x +c -1\right ) c}{2 d}+\frac {b \ln \left (-d x -c -1\right )}{2 d}+\frac {b \ln \left (d x +c -1\right )}{2 d}\) | \(90\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 36, normalized size = 0.90 \begin {gather*} a x + \frac {{\left (2 \, {\left (d x + c\right )} \operatorname {artanh}\left (d x + c\right ) + \log \left (-{\left (d x + c\right )}^{2} + 1\right )\right )} b}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 61, normalized size = 1.52 \begin {gather*} \frac {b d x \log \left (-\frac {d x + c + 1}{d x + c - 1}\right ) + 2 \, a d x + {\left (b c + b\right )} \log \left (d x + c + 1\right ) - {\left (b c - b\right )} \log \left (d x + c - 1\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.23, size = 46, normalized size = 1.15 \begin {gather*} a x + b \left (\begin {cases} \frac {c \operatorname {atanh}{\left (c + d x \right )}}{d} + x \operatorname {atanh}{\left (c + d x \right )} + \frac {\log {\left (c + d x + 1 \right )}}{d} - \frac {\operatorname {atanh}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \operatorname {atanh}{\left (c \right )} & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 200 vs.
\(2 (38) = 76\).
time = 0.40, size = 200, normalized size = 5.00 \begin {gather*} \frac {1}{2} \, {\left ({\left (c + 1\right )} d - {\left (c - 1\right )} d\right )} b {\left (\frac {\log \left (\frac {{\left | -d x - c - 1 \right |}}{{\left | d x + c - 1 \right |}}\right )}{d^{2}} - \frac {\log \left ({\left | -\frac {d x + c + 1}{d x + c - 1} + 1 \right |}\right )}{d^{2}} + \frac {\log \left (-\frac {c - \frac {{\left (\frac {{\left (d x + c + 1\right )} {\left (c - 1\right )}}{d x + c - 1} - c - 1\right )} d}{\frac {{\left (d x + c + 1\right )} d}{d x + c - 1} - d} + 1}{c - \frac {{\left (\frac {{\left (d x + c + 1\right )} {\left (c - 1\right )}}{d x + c - 1} - c - 1\right )} d}{\frac {{\left (d x + c + 1\right )} d}{d x + c - 1} - d} - 1}\right )}{d^{2} {\left (\frac {d x + c + 1}{d x + c - 1} - 1\right )}}\right )} + a x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.44, size = 48, normalized size = 1.20 \begin {gather*} a\,x+\frac {\frac {b\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2-1\right )}{2}+b\,c\,\mathrm {atanh}\left (c+d\,x\right )}{d}+b\,x\,\mathrm {atanh}\left (c+d\,x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________